<?php

namespace apps\fzq\controllers;

use apps\fzq\models\fzqDistrictDic;
class DBController extends \Phalcon\Mvc\Controller
{
	public function countAction()
	{
		
		$iStart = microtime( true );
		$where = array(  'conditions' => 'upid=:upid:', 'bind' => array( 'upid' => 0 ) );
// 		$where = array(  'conditions' => 'upid=:upid:', 'bind' => array( 'upid' => 0 ), 'limit' => 36 );
		
		for( $i = 0; $i < 5000; ++$i )
		{
// 			$where = array(  'conditions' => 'upid=:upid:', 'bind' => array( 'upid' => 0 ) );
			$res = fzqDistrictDic::count( $where );
		}
		
		echo microtime( true ) - $iStart;
	}
	
	public function iAction()
	{
		echo __METHOD__, '<br>';
// 		$this->view->disable();
// 		return $this->dispatcher->forward( array( 'controller' => 'db', 'action' => 'r' ) );

		return $this->response->redirect( '/fzq/db/r' );
	}
	
	public function rAction()
	{
		echo __FILE__, '<br>';
		
		$this->view->disable();
	}
}

?>